Skip to content

chore(xtask): add size-optimized apple-release profile#6714

Draft
stefanceriu wants to merge 2 commits into
mainfrom
stefan/releaseShenanigans
Draft

chore(xtask): add size-optimized apple-release profile#6714
stefanceriu wants to merge 2 commits into
mainfrom
stefan/releaseShenanigans

Conversation

@stefanceriu

Copy link
Copy Markdown
Member

Distributed Apple framework built with release links ~33% more code than necessary. Add an apple-release profile using opt-level = "s", which measured ~33% smaller linked code with no behavior change.

This is to address "This [binary] exceeds the cellular network download size limit and may require your app to be downloaded over Wi-Fi. Users running iOS 13 or later can choose to use cellular data to download apps that exceed this limit." AppStore warnings.

@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.95%. Comparing base (edf75c8) to head (b557f3d).
⚠️ Report is 33 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6714   +/-   ##
=======================================
  Coverage   89.95%   89.95%           
=======================================
  Files         398      398           
  Lines      110906   110906           
  Branches   110906   110906           
=======================================
+ Hits        99764    99768    +4     
+ Misses       7379     7365   -14     
- Partials     3763     3773   +10     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@codspeed-hq

codspeed-hq Bot commented Jul 3, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 50 untouched benchmarks


Comparing stefan/releaseShenanigans (b557f3d) with main (7bf142a)

Open in CodSpeed

Distributed Apple framework built with release links ~33% more code than
necessary. Add an apple-release profile using opt-level = "s", which
measured ~33% smaller linked code with no behavior change.
@Hywan

Hywan commented Jul 7, 2026

Copy link
Copy Markdown
Member

Why not using the dist profile? It's also doing opt-level = "s", but strip debuginfo too.

@Hywan Hywan self-requested a review July 7, 2026 09:31
@pixlwave

pixlwave commented Jul 8, 2026

Copy link
Copy Markdown
Member

I believe it's because Xcode strips the symbols for us when we archive the app, but not only that, if they're in the XCFramework then it will also include them in the .dSYM bundle for crash log symbolication.

Comment thread Cargo.toml

# Profile for the distributed Apple framework. `opt-level = "s"` measured ~33%
# smaller linked code than `release`.
[profile.apple-release]

@pixlwave pixlwave Jul 8, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should call this swift-release given it will be used by the swift xtask?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants